package csc.fresher.dao;

import java.sql.Timestamp;
import java.util.List;

import csc.fresher.entity.AccountHasInterestRate;
import csc.fresher.entity.CustomerAccount;
import csc.fresher.entity.SavingAccount;
import csc.fresher.entity.SavingTransaction;

public interface SavingAccountDao extends CustomerAccountDao {
	public long insert(SavingAccount savingAccount);

	public boolean update(SavingAccount savingAccount);

	public boolean delete(SavingAccount savingAccount);

	public List<CustomerAccount> getAccountByState(String accountState);

	public List<CustomerAccount> getAccountByIDCardNumber(String idCardNumber);

	public List<CustomerAccount> getAccountByFirstName(String firstName);

	public List<CustomerAccount> getAccoungByPhoneNumber(String phoneNumber);

	public List<CustomerAccount> getAccountByAddress(String address);

	// update state (@uthor: Nghia)
	public boolean updateStateToActive(SavingAccount savingAccount);

	public boolean updateStateToDisable(SavingAccount savingAccount);

	public boolean updateStateToRemovable(SavingAccount savingAccount);

	public List<CustomerAccount> getAllSavingAccounts();

	public List<CustomerAccount> getAllIsRepeatableSavingAccountByDate(
			Timestamp time);

	public boolean updateStateToRemoved(SavingAccount savingAccount);

	public boolean repeatPeriod(SavingAccount savingAccount);

	public boolean updateRepeatable(SavingAccount savingAccount,
			AccountHasInterestRate accountHasInterestRate, long id, SavingTransaction savingTransaction);

	boolean approveAccount(SavingAccount savingAccount);
}
